home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 6 / QRZ Ham Radio Callsign Database - Volume 6.iso / pc / files / dsp / 56100tar.z / 56100tar / 56100 / g722 / code.hlp
Encoding:
Text File  |  1992-04-15  |  11.3 KB  |  505 lines

  1.     Name            :    G722 Speech Code
  2.  
  3.     Filetype        :    DSP56116 Assembler
  4.  
  5.     Version            :    1.01
  6.  
  7.     Date Entered        :    29th June 1990
  8.  
  9.     Last Modified        :    30th March 1992
  10.  
  11.     Description        :    Standardised CCITT G722 ADPCM Speech
  12.                     Compression Code
  13.  
  14.  
  15.  
  16.     General            :    The file G722.ASM contains the source
  17.  
  18. code for implementing the digital speech coding algorithm as specified by the
  19.  
  20. CCITT's G722 recommendation document. Associated with this file are two
  21.  
  22. separate files, G722.CMD and MODCOD.TST. These files should be used with the
  23.  
  24. assembled G722 code to provide a simple download to the target system and to
  25.  
  26. tell the G722 algorithm decoder which mode to operate in respectively. The
  27.  
  28. code as it stands cannot be used to pass test vectors and has been written to
  29.  
  30. interface with A/D and D/A converters via the DSP56116's Synchronous Serial
  31.  
  32. Interface in a loopback mode for subjective testing.
  33.  
  34.     The test vectors that are supplied by the CCITT can only be used to
  35.  
  36. test the G722 Encoder and Decoder separately without incorporation of the
  37.  
  38. transmit and receive Q.M.F.'s (Quadrature Mirror Filters). In the G722 source
  39.  
  40. version provided both the Encoder and Decoder have passed all of the CCITT test
  41.  
  42. vectors as detailed in Appendix 2 of the recommendation. Testing of the overall
  43.  
  44. G722 algorithm should be made using separate input/output SNR measuring
  45.  
  46. software or analogue hardware, preferably by software.
  47.  
  48.     The 56116ADS driver program that is provided on the disk is an older
  49.  
  50. version of the program which does not require the executing assembly program
  51.  
  52. to check the carry flag in the DSP to check for an "end of file" condition.
  53.  
  54. If users wish to use later versions of the 56116ADS driver then the G722
  55.  
  56. assembly code will need to be updated to meet this criterion. 
  57.  
  58.     In order to fully understand the 56116 G722 code, reference should be
  59.  
  60. made to the CCITT's G722 recommendation "7 kHz Audio coding within 64 kbit/sec".
  61.  
  62.     The code has been written in absolute format and requires conversion
  63.  
  64. into relocatable format.
  65.  
  66.     In order to utilise all three G722 modes in an application separate
  67.  
  68. communications protocols (like the CCITT's H221 and G725 recommendations) MUST 
  69.  
  70. be used in order to signal to the Decoder from the transmitting terminal 
  71.  
  72. which mode is required.
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.     Memory Usage    :
  83.  
  84.  
  85.     (for code provided)
  86.  
  87.  
  88.                         Program            Data
  89.  
  90.  
  91.  
  92.             Internal           1001             232
  93.  
  94.  
  95.             External              0            0
  96.  
  97.  
  98.  
  99.             Total               1001             232
  100.  
  101.  
  102.  
  103.     The actual kernel of the G722 code requires considerably less program
  104.  
  105. memory. This is because the code has been written to be burned into a prom.. 
  106.  
  107. This means that a lot of the pre-defined constants required for the algorithm 
  108.  
  109. are defined in program memory and are loaded into to data RAM space upon code 
  110.  
  111. initialisation.
  112.  
  113.  
  114.  
  115.  
  116.  
  117.     Performance    :    In order to run in real time the code requires 
  118.  
  119. a peak performance of 9.41 MIPS for Full-Duplex communication. The breakdown 
  120.  
  121. of the performance of the G722 kernel for worst case is as below ;
  122.  
  123.  
  124.  
  125.             Processor Performance        Instruction Cycles
  126.  
  127.  
  128.                  MIPS
  129.  
  130.  
  131.  
  132.     G722 Encoder        8.40                524
  133.  
  134.  
  135.     G722 Decoder        7.64                477
  136.  
  137.  
  138.     QMF + Encoder        9.41                588
  139.  
  140.  
  141.     Decoder + QMF        8.66                541
  142.  
  143.  
  144.  
  145.  
  146.     Further Info.    :    A full application report is available for the
  147.  
  148. G722 implementation with the order code APR404/D, and a short 8 page H221 
  149.  
  150. application guide document is available which provides an overview of how the 
  151.  
  152. G722 Speech and H221 protocol algorithms could fit together in a real-time
  153.  
  154. application. The document also provides an overview of the implementation of
  155.  
  156. the H221 protocol software which is also available for the same device. This 
  157.  
  158. may be obtained from the following person ;
  159.  
  160.  
  161.  
  162.         Phil Atherton
  163.  
  164.  
  165.         DSP Applications Engineer
  166.  
  167.  
  168.         Motorola Semiconductors Ltd
  169.  
  170.  
  171.         Colvilles Road
  172.  
  173.  
  174.         Kelvin Industrial Estate
  175.  
  176.  
  177.         East Kilbride
  178.  
  179.  
  180.         GLASGOW
  181.  
  182.  
  183.         Scotland        G75 0TG
  184.  
  185.  
  186.  
  187.     Tel. :    (+44/0) 3552  40377
  188.  
  189.  
  190.  
  191.  
  192.     On the disk provided there are a number of directories. The 
  193.  
  194. documentation that follows describes the files that can be found within the 
  195.  
  196. respective directories and when to use them.
  197.  
  198.     In the top level directory there are 7 directories and 1 file which 
  199. are;
  200.  
  201.  
  202. ASSEMBLY        ; Contains the assembly code which passes the G722
  203.             ; test vectors.
  204.  
  205. CMDFILE            ; Contains all the command files used to automate the
  206.             ; G722 test-vector test.
  207.  
  208. BATFILE            ; Contains the batch files used to execute the G722
  209.             ; test-vector runs.
  210.  
  211. 56116ADS        ; Contains an early version of the 56116 ADS driver and
  212.             ; help files for a PC-AT.
  213.  
  214. RESULTS            ; Supplied empty, this directory is used as storage 
  215.             ; for the ADS output files when the G722 code is 
  216.             ; executed.
  217.  
  218. TESTVECT        ; Should contain a subset of the test vector files 
  219.             ; which have been converted into a format acceptable 
  220.             ; for  the 56116 ADS driver and the 'C' executable 
  221.             ; files used  to convert the original CCITT test 
  222.             ; vectors which are supplied in a format not ideal 
  223.             ; for the development tools.
  224.  
  225. G722CODE        ; Contains the final G722 code as written for use in    
  226.             ; an application.
  227.  
  228. H221FIX            ; Contains H221 56116ADS files 
  229.  
  230.  
  231. CODE.HLP        ; This file
  232.  
  233.     In the ASSEMBLY directory there are 4 files which are;
  234.  
  235.  
  236. NCDG722.ASM        ; The G722 assembly code used to pass the converted
  237.             ; CCITT test vectors on both the 56116 simulator and
  238.             ; ADS board.
  239.  
  240. NCDG722.LOD        ; The 56116 object code of the above file used for the
  241.             ; test-vector runs.
  242.  
  243. NCDG722.BAT        ; This batchfile simply invokes the 56116 assembler,
  244.             ; "ASM5616 -a -b -l ncdg722".
  245.  
  246.  
  247.     In the CMDFILE directory there are 17 files which are;
  248.  
  249.  
  250. MODDEC1.TST        ; Used to tell the executed "ncdg722" code that the G722
  251.  
  252. MODDEC2.TST        ; Decoder is to be tested and that the G722 Decoder is
  253.  
  254. MODDEC3.TST        ; set for MODE 1, 2 OR 3.
  255.             ; Contains 2 values, "0001  000x",
  256.             ; First '0001' is for testing the G722 Decoder.
  257.             ; 'x' is the Decoder  mode and takes the values 1, 2 or 3.
  258.  
  259. MODCOD.TST        ; Tells the executed "ncdg722" code that the G722
  260.             ; Encoder is to be tested and here the MODE is irrelevant.
  261.             ; Contains a single value "0000" for Encoder test.
  262.  
  263. T1C1XMT.CMD        ; These files are the command files which test individual
  264.  
  265. T1C2XMT.CMD        ; test-vector runs of the NCDG722 code. All have been
  266.  
  267. T1C1XMT#.CMD        ; set up to automatically load in the MODE files and
  268.  
  269. T1C2XMT#.CMD        ; NCDG722.LOD  file to the designated target system and
  270.  
  271. T2R1COD1.CMD        ; to dump the respective output files into the RESULTS
  272.  
  273. T2R1COD2.CMD        ; directory.
  274.  
  275. T2R1COD3.CMD
  276.  
  277. T2R2COD1.CMD
  278.  
  279. T2R2COD2.CMD
  280.  
  281. T2R2COD3.CMD
  282.  
  283. T1D3COD1.CMD
  284.  
  285. T1D3COD2.CMD
  286.  
  287. T1D3COD3.CMD
  288.  
  289.  
  290.     In the BATFILE directory there are 4 files which are;
  291.  
  292.  
  293. G722TEST.BAT        ; Batchfile which is used to invoke the  56116 ADS driver
  294.             ; program with the appropriate COMMAND file and once
  295.             ; the vectors have been passed it compares the
  296.             ; appropriate test-vector files with the NCDG722 output
  297.             ; files.
  298.  
  299. HALFTEST.BAT        ; This batchfile is a subset of G722TEST.BAT  so that
  300.             ; some of the test-vectors could be included on disk for a
  301.             ; sample test.
  302.  
  303. ADS16ON.BAT        ; Batch file which sets up the PC's path for the 56116
  304.             ; ADS driver that is provided on the disk.
  305.  
  306. COMPADS.EXE        ; Test vector and ADS output compare program
  307.  
  308.  
  309.     In the 56116ADS directory there should be 6 files. These should be
  310. provided by the user. For later versions of the 56116ADS driver software the
  311. ncdg722.asm files will require modification to take into account the new 
  312. end_of_file recognition process. (See your ADS manual for the description) ;
  313.  
  314.  
  315. ADS56116.EXE        ; The ADS driver program and associated help files
  316.  
  317. ADS16CMD.HLP
  318.  
  319. ADS16REG.HLP
  320.  
  321. ADS16USR.HLP
  322.  
  323. FTE000.ASM    
  324.  
  325. README.DOC
  326.  
  327.  
  328.     In the TESTVECT directory there should be 17 files which are ;
  329.  
  330.  
  331. CVCBIN.C        ; 'C' file used to convert CCITT Hex. file to binary
  332.  
  333. CVCSIM.C        ; 'C' file used to convert CCITT Hex file to Simulator
  334.             ; format
  335.  
  336. CVCADS.C        ; 'C' file used to convert CCITT Hex. file to ADS format
  337.  
  338. CVCBIN.EXE        ; Executable file of CVCBIN.C
  339.  
  340. CVCSIM.EXE        ; Executable file of CVCSIM.C
  341.  
  342. CVCADS.EXE        ; Executable file of CVCADS.C
  343.  
  344. WORKCV.BAT        ; Batch files used to convert ALL CCITT test vectors
  345.  
  346. WORKSIM.BAT
  347.  
  348. WORKADS.BAT
  349.  
  350. ADST1C1.XMT        ; Handful of the CCITT test files used for on-disk
  351.  
  352. ADST1C2.XMT        ; test passes. These should be provided by you and
  353.  
  354. ADST2R1.COD        ; converted into the correct format using the CVC.exe 
  355.  
  356. ADST2R2.COD        ; program.
  357.  
  358. ADST3L2.RC1
  359.  
  360. ADST3L2.RC2
  361.  
  362. ADST3L2.RC3
  363.  
  364. ADST3H2.RC0
  365.  
  366.  
  367.     IN THE G722CODE Directory there are 2 files which are ;
  368.  
  369.  
  370. G722.ASM        ; This file is the final G722 code version as 
  371.             ; described in the G722 application note. 
  372.  
  373. G722_156.ASM        ; This assembly file is a modified version of
  374.             ; the G722.ASM file which is written for use
  375.             ; with the DSP56156 processor using its on-chip
  376.             ; codec and Phase-Locked-Loop.
  377.  
  378.     In the H221FIX directory there are 12 files which are ;
  379.  
  380.  
  381. H221RX.ASM        ; These files are the latest updates of modified
  382.             ; H221 files.
  383. H221TX.ASM
  384.  
  385. H221VAR.ASM
  386.  
  387.  
  388.     In the RESULTS directory there are 0 files. This directory is the 
  389.  
  390. destination directory for the G722 ADS test output files.
  391.  
  392.  
  393.     In order to implement the test vector test you must first go to the
  394.  
  395. BATFILE directory. Once in this directory type "ADS16ON" ;  this sets up the
  396.  
  397. path of the PC to recognise the ADS driver program that the user provides.
  398.  
  399. Once this has been done you must then type "HALFTEST" , as this invokes the
  400.  
  401. batchfile which tests the CCITT test vector subset included on disk.
  402.  
  403.     The first command that this batchfile executes is "ADS56116" which
  404.  
  405. invokes the on-disk ADS driver program.
  406.  
  407. Once in the ADS environment, at the  "ADM0>"  prompt type ;
  408.  
  409.  
  410.  
  411.         "cf" <spacebar> "r" <return>
  412.  
  413.  
  414. this resets the 56116 command converter board. Next type ;
  415.  
  416.  
  417.         "f" <spacebar> "r" <return>
  418.  
  419.  
  420. where this resets the 56116 chip on the ADS board.  Once this has been done
  421.  
  422. without problem type ;
  423.  
  424.  
  425.         "d" <return>
  426.  
  427.  
  428. which should display the contents of the 56116 core registers.  Now you can 
  429.  
  430. quit the ADS driver program by typing ;
  431.  
  432.  
  433.         "q" <return>
  434.  
  435.  
  436.     This process is undertaken to properly reset the 56116 ADS hardware 
  437.  
  438. before actually performing the tests.
  439.  
  440.     The batch file now automatically invokes the ADS driver once more, but 
  441.  
  442. with the appropriate COMMAND file. "<filename>.cmd".  This then automatically 
  443.  
  444. loads the "ncdg722.lod" file into the 56116 chip on the ADS board and sets up 
  445.  
  446. the appropriate input and output files and their directories for the proper 
  447.  
  448. execution of the tests. Once this has been done, again at the "ADM0>" prompt 
  449.  
  450. type ;
  451.  
  452.  
  453.         "g" <return>
  454.  
  455.  
  456. which begins execution of the first test.  You should then check that the PC is
  457.  
  458. actually accessing the floppy disk to make sure that there is 56116ADS activity.
  459.  
  460. Once the test is complete the 56116ADS drIver program will respond with the
  461.  
  462. prompt ;
  463.  
  464.  
  465.         ADM#0    END OF INPUT FILE
  466.  
  467.  
  468.     This indicates that all the input test vectors have been passed. Now
  469.  
  470. you may quit the ADS driver again by typing ;
  471.  
  472.  
  473.          "q"
  474.  
  475.  
  476.     The batch file now invokes the file comparison process and the result 
  477.  
  478. of the test is displayed on the PC display screen. The command which is 
  479.  
  480. executed will be ;
  481.  
  482.  
  483.     compads        a:<directory1><filename1>   a:<directory2><filenname2>
  484.  
  485.  
  486.  
  487.     Once the files have been compared if there is an error, the program will
  488.  
  489. indicate the values in each file and the position within the file where the 
  490.  
  491. error occured.
  492.  
  493.     The process indicated above is then repeated for the other command 
  494.  
  495. files. The test vectors can be acquired from the CCITT for a nominal fee and 
  496.  
  497. to then adjust the files and directories in the COMMAND and BATCH  file 
  498.  
  499. directories accordingly.
  500.  
  501.  
  502.  
  503.     ****************************************************************
  504.  
  505.